QapTcha error issue. Works locally, not on live server [migrated]
Posted
by
BlassFemur
on Pro Webmasters
See other posts from Pro Webmasters
or by BlassFemur
Published on 2012-12-13T18:29:11Z
Indexed on
2012/12/13
23:21 UTC
Read the original article
Hit count: 293
php
|JavaScript
I am adding QapTcha (http://demos.myjqueryplugins.com/qaptcha/) to a website that I am working on and I'm getting the error "Uncaught TypeError: Cannot read property 'error' of null". What's weird to me is everything is working perfectly locally. No errors or anything. Once I uploaded via ftp to the live server, I get the above error. Below is the block of code that seems to be generating the error:
Slider.draggable({ revert: function(){ if(opts.autoRevert) { if(parseInt(Slider.css("left")) > (bgSlider.width()-Slider.width()-10)) return false; else return true; } }, containment: bgSlider, axis:'x', stop: function(event,ui){ if(ui.position.left > (bgSlider.width()-Slider.width()-10)) { // set the SESSION iQaptcha in PHP file $.post(opts.PHPfile,{ action : 'qaptcha', qaptcha_key : inputQapTcha.attr('name') }, function(data) { if(!data.error) Uncaught TypeError: Cannot read property 'error' of null { Slider.draggable('disable').css('cursor','default'); inputQapTcha.val(''); TxtStatus.text(opts.txtUnlock).addClass('dropSuccess').removeClass('dropError'); form.find('input[type=\'submit\']').removeAttr('disabled'); if(opts.autoSubmit) form.find('input[type=\'submit\']').trigger('click'); } },'json'); } } });
I'm not really sure what's going on as to why it works locally and not on the server. Any help/ suggestions would be appreciated. Thanks
© Pro Webmasters or respective owner